@popover: ~'w-popover';
@popover-bg: #fff;

.@{popover} {
  position: relative;
  display: inline-block;
  outline: 0;
  &-arrow {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: transparent;
    z-index: 21;
  }
  &-inner {
    font-size: 12px;
    display: block;
    text-align: left;
    text-decoration: none;
    background-color: @popover-bg;
    border-radius: 4px;
    min-height: 23px;
    box-shadow: rgba(16, 22, 26, 0.1) 0px 0px 0px 1px, rgba(16, 22, 26, 0.2) 0px 2px 4px,
      rgba(16, 22, 26, 0.2) 0px 8px 24px;
  }

  &.right &-arrow,
  &.rightTop &-arrow,
  &.rightBottom &-arrow {
    left: 2px;
    margin-top: -15px;
    top: 50%;
  }

  &.left &-arrow,
  &.leftTop &-arrow,
  &.leftBottom &-arrow {
    transform: rotate(180deg);
    margin-top: -15px;
    right: 2px;
    top: 50%;
  }
  &.leftTop &-arrow,
  &.rightTop &-arrow {
    top: 15px;
  }
  &.leftBottom &-arrow,
  &.rightBottom &-arrow {
    bottom: 0;
    top: auto;
  }

  &.top &-arrow,
  &.topLeft &-arrow,
  &.topRight &-arrow {
    transform: rotate(-90deg);
    bottom: 2px;
    left: 50%;
    margin-left: -15px;
  }

  &.bottom &-arrow,
  &.bottomLeft &-arrow,
  &.bottomRight &-arrow {
    transform: rotate(90deg);
    left: 50%;
    margin-left: -15px;
    top: 2px;
  }
  &.bottomLeft &-arrow,
  &.topLeft &-arrow {
    left: 15px;
  }
  &.bottomRight &-arrow,
  &.topRight &-arrow {
    right: 0;
    left: auto;
  }

  &.top,
  &.topLeft,
  &.topRight {
    padding-bottom: 13px;
  }
  &.bottom,
  &.bottomLeft,
  &.bottomRight {
    padding-top: 13px;
  }
  &.right,
  &.rightTop,
  &.rightBottom {
    padding-left: 13px;
  }
  &.left,
  &.leftTop,
  &.leftBottom {
    padding-right: 13px;
  }

  &.no-arrow {
    padding: 0 !important;
  }
}
